/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AddSpecialPanel.java
 *
 * Created on Nov 2, 2011, 1:42:35 PM
 */
package drinkkiosk.drinks;

import java.io.FileNotFoundException;
import java.io.IOException;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

/**AddSpecialPanel is a JPanel with multiple ComboBoxes for adding a SpecialDrink.
 * As the Staff chooses from the drop-down menus, the SpecialDrink object is
 * updated.
 * @author Charles Ritchea
 */
public class DisplaySpecialPanel extends javax.swing.JPanel {

	/**
	 * 
	 * @return
	 */
	public JLabel getBarwareJLabel() {
		return barwareJLabel;
	}

	/**
	 * 
	 * @param barwareJLabel
	 */
	public void setBarwareJLabel(JLabel barwareJLabel) {
		this.barwareJLabel = barwareJLabel;
	}

	/**
	 * 
	 * @return
	 */
	public JLabel getGarnishJLabel() {
		return garnishJLabel;
	}

	/**
	 * 
	 * @param garnishJLabel
	 */
	public void setGarnishJLabel(JLabel garnishJLabel) {
		this.garnishJLabel = garnishJLabel;
	}

	/**
	 * 
	 * @return
	 */
	public JScrollPane getjScrollPane1() {
		return jScrollPane1;
	}

	/**
	 * 
	 * @param jScrollPane1
	 */
	public void setjScrollPane1(JScrollPane jScrollPane1) {
		this.jScrollPane1 = jScrollPane1;
	}

	/**
	 * 
	 * @return
	 */
	public JTextArea getjTextArea1() {
		return jTextArea1;
	}

	/**
	 * 
	 * @param jTextArea1
	 */
	public void setjTextArea1(JTextArea jTextArea1) {
		this.jTextArea1 = jTextArea1;
	}

	/**
	 * 
	 * @return
	 */
	public JLabel getLiqueuerJLabel() {
		return liqueuerJLabel;
	}

	/**
	 * 
	 * @param liqueuerJLabel
	 */
	public void setLiqueuerJLabel(JLabel liqueuerJLabel) {
		this.liqueuerJLabel = liqueuerJLabel;
	}

	/**
	 * 
	 * @return
	 */
	public JLabel getLiquorJLabel() {
		return liquorJLabel;
	}

	/**
	 * 
	 * @param liquorJLabel
	 */
	public void setLiquorJLabel(JLabel liquorJLabel) {
		this.liquorJLabel = liquorJLabel;
	}

	/**
	 * 
	 * @return
	 */
	public JLabel getNameJLabel() {
		return nameJLabel;
	}

	/**
	 * 
	 * @param nameJLabel
	 */
	public void setNameJLabel(JLabel nameJLabel) {
		this.nameJLabel = nameJLabel;
	}

	/**
	 * 
	 * @return
	 */
	public JLabel getNonAlcoholicJLabel() {
		return nonAlcoholicJLabel;
	}

	/**
	 * 
	 * @param nonAlcoholicJLabel
	 */
	public void setNonAlcoholicJLabel(JLabel nonAlcoholicJLabel) {
		this.nonAlcoholicJLabel = nonAlcoholicJLabel;
	}

	/**
	 * 
	 * @return
	 */
	public JLabel getTemperatureJLabel() {
		return temperatureJLabel;
	}

	/**
	 * 
	 * @param temperatureJLabel
	 */
	public void setTemperatureJLabel(JLabel temperatureJLabel) {
		this.temperatureJLabel = temperatureJLabel;
	}
	private int specialsIndex;
	private DrinkDatabase drinkDatabase;
	/**The Special Drink*/
	private SpecialDrink specialDrink;
	/**Drink Getter
	 * @return Drink
	 * @throws FileNotFoundException
	 * @throws IOException
	 * @throws ClassNotFoundException  
	 */
	private SpecialDrink getSpecialDrink(){
		return specialDrink;
	}
	/**AddSpecialPanel creates a new Drink with empty fields
	 */
	public DisplaySpecialPanel() {
		specialsIndex = 0;
		drinkDatabase = new DrinkDatabase();
		initComponents();
	}

	/**
	 * 
	 * @return
	 */
	public int getSpecialsIndex() {
		return specialsIndex;
	}

	/**
	 * 
	 * @param specialsIndex
	 */
	public void setSpecialsIndex(int specialsIndex) {
		this.specialsIndex = specialsIndex;
	}

	/**
	 * 
	 * @return
	 */
	public DrinkDatabase getDrinkDatabase() {
		return drinkDatabase;
	}

	/**
	 * 
	 * @param drinkDatabase
	 */
	public void setDrinkDatabase(DrinkDatabase drinkDatabase) {
		this.drinkDatabase = drinkDatabase;
	}
	/**
	 * 
	 * @param drink
	 */
	public void setComponents(SpecialDrink drink){
		nameJLabel.setText(drink.getName());
		liquorJLabel.setText(drink.getLiquor());
		liqueuerJLabel.setText(drink.getLiqueur());
		nonAlcoholicJLabel.setText(drink.getNonalcoholic());
		garnishJLabel.setText(drink.getGarnish());
		barwareJLabel.setText(drink.getBarware());
		temperatureJLabel.setText(drink.getTemperature());
		jTextArea1.setText(drink.getDescription());
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        liquorJLabel = new javax.swing.JLabel();
        liqueuerJLabel = new javax.swing.JLabel();
        nonAlcoholicJLabel = new javax.swing.JLabel();
        garnishJLabel = new javax.swing.JLabel();
        barwareJLabel = new javax.swing.JLabel();
        temperatureJLabel = new javax.swing.JLabel();
        nameJLabel = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();

        setBackground(new java.awt.Color(255, 255, 255));

        liquorJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        liqueuerJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        nonAlcoholicJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        garnishJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        barwareJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        temperatureJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        nameJLabel.setFont(new java.awt.Font("Arial", 0, 24));

        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setFont(new java.awt.Font("Arial", 0, 24)); // NOI18N
        jTextArea1.setLineWrap(true);
        jTextArea1.setRows(5);
        jTextArea1.setWrapStyleWord(true);
        jScrollPane1.setViewportView(jTextArea1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(nameJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                    .addComponent(liquorJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                    .addComponent(liqueuerJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                    .addComponent(garnishJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                    .addComponent(barwareJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(temperatureJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE))
                    .addComponent(nonAlcoholicJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 255, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(nameJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(liquorJLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(liqueuerJLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nonAlcoholicJLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(garnishJLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(barwareJLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(temperatureJLabel)
                        .addGap(18, 18, 18))))
        );
    }// </editor-fold>//GEN-END:initComponents
	/**When the Staff changes LiquorComboBox the Drink is changed to match
	 * @param evt ActionEvent the event of LiquorComboBox being changed 
	 */	/**When the Staff changes LiqueurComboBox the Drink is changed to match
	 * @param evt ActionEvent the event of LiqueurComboBox being changed 
	 */	/**When the Staff changes NonAlcoholicComboBox the Drink is changed to match
	 * @param evt ActionEvent the event of NonAlcoholicComboBox being changed 
	 */	/**When the Staff changes GarnishComboBox the Drink is changed to match
	 * @param evt ActionEvent the event of GarnishComboBox being changed 
	 */	/**When the Staff changes BarwareComboBox the Drink is changed to match
	 * @param evt ActionEvent the event of BarwareComboBox being changed 
	 */	/**When the Staff changes TemperatureComboBox the Drink is changed to match
	 * @param evt ActionEvent the event of TemperatureComboBox being changed 
	 */	/**When the Staff changes NameTextField the Drink is changed to match
	 * @param evt ActionEvent the event of NameTextField being changed 
	 */	/**The SpecialDrink is added to the SpecialsList
	 * @param evt ActionEvent the event of AddButton being pressed 
	 */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel barwareJLabel;
    private javax.swing.JLabel garnishJLabel;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JLabel liqueuerJLabel;
    private javax.swing.JLabel liquorJLabel;
    private javax.swing.JLabel nameJLabel;
    private javax.swing.JLabel nonAlcoholicJLabel;
    private javax.swing.JLabel temperatureJLabel;
    // End of variables declaration//GEN-END:variables
}
